onmessage = function(e) {
	postMessage('[' + e.data + ']');
	if (e.data == 'close') {
		close();
	}
};

var i = 0;
setInterval(function(){
	postMessage(i++);
}, 1000);
